package com.dev.security.manager.dao;

import org.springframework.data.jpa.repository.Query;

import com.dev.security.config.dao.BaseRepository;
import com.dev.security.manager.beans.Account;

/**
 * @author 潜行的青衣
 * @see
 */
public interface AccountRepository extends BaseRepository<Account, String> {

	@Query("select acc from Account acc where account=?1 and status=?2")
	public Account findOne(String account, String status);
	
	@Query("select count(*) from Account acc where account=?1 and status=?2")
	public long count(String account, String status);
	
	@Query("select count(*) from Account acc where id!=?1 and account=?2 and status=?3")
	public long count(String id, String account, String status);
	
}
